﻿@model IEnumerable<Lost_and_Found.Models.ViewModel.ItemSuggestModel>
@{
    ViewBag.Title = "ItemManager";
    Layout = "~/Views/Shared/_Backend.cshtml";

}

<h2>Quản lý đồ gợi ý</h2>
<p>
    @Html.ActionLink("Create New", "CreateItem")
</p>
<table class="table table-hover table-striped">
    <tr>
        <th>Tên
        </th>
        <th>Các thuột tính
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td >
                @Html.DisplayFor(m => item.Name)
            </td>
            <td>

                @foreach (var attribute in item.ListAttribute)
                {
                    @Html.ActionLink(attribute.Name, "EditAttribute", new { attributeID = attribute.ID})
                    <text> &nbsp</text>
                }
            </td>
            <td>
                @Html.ActionLink("Edit", "EditItem", new { ItemId = item.ID }) |
                @Html.ActionLink("Delete", "DeleteItem", new { ItemId = item.ID })
            </td>
        </tr>
    }

</table>
